﻿<UserControl x:Class="BestCode.Creds.UI.UserControls.DynamicCanvas"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" >
    <UserControl.Resources>
        <Style TargetType="Button" x:Name="commonStyle">
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="FontStyle" Value="Normal"/>
            <Setter Property="FontFamily" Value="Arial"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="Background" Value="RosyBrown"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommomStates">

                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="LightGray" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="LightGray" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled" >
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="LightGray" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Focused" >
                                        <Storyboard>
                                            <ColorAnimation Duration="0" To="YellowGreen" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="rectangle"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Rectangle x:Name="rectangle" Fill="#FFF4F4F4" StrokeThickness="1" Stroke="Black"/>
                            <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

      

    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Canvas x:Name="DynamicAreaCanvas" RenderTransformOrigin="0.463,0.5" VerticalAlignment="Stretch" Margin="0,0,0,0" HorizontalAlignment="Stretch">
            <!-- This is visible -->
            <!--<Line X1="0" Y1="0" X2="200" Y2="0" Stroke="Black" StrokeThickness="0.5" Height="5" Width="{Binding ElementName=DynamicCanvas, Path=Width}" />-->
            <!--<Button x:Name="btnName" Canvas.Left="196" Canvas.Top="40">Nombre Cheque</Button>
            <Button x:Name="btnMICR" Canvas.Left="102" Canvas.Top="145">MICR numero 452136522213</Button>
            <Button x:Name="btnCodigo" Canvas.Left="51" Canvas.Top="18">Codigo</Button>
            <Button x:Name="btnDatosFecha" Canvas.Left="43" Canvas.Top="93">Datos de Fecha</Button>-->
        </Canvas>
    </Grid>
</UserControl>
